<template>
  <div class="my-footer" >
    <div class="info">
      <img :src="this.$store.state.audio.info.img_url">
      <div class="title">
        <p>{{this.$store.state.audio.info.name}}</p>
        <p>{{this.$store.state.audio.info.singer}}</p>
      </div>
      <div class="icon">
        <i class="play-status" :class="playStatus ? 'icon-pause-detail' : 'icon-playdetail' " @click="play()"></i>
        <i class="icon-list-music"></i>
      </div>
    </div>
    <audioPlayer style="display: none"  >
    </audioPlayer>
  </div>
</template>

<script type="text/ecmascript-6">

  import audioPlayer from '@/components/audio/audio'

  export default {
    name: "v-footer",
    data() {
      return {
        pause: false
      }
    },
    computed: {
      playStatus () {
        return this.$store.state.audio.playing
      }
    },
    methods: {
      play() { //点击播放/暂停
        this.$store.commit('setPlayStatus')
      },
    },
    mounted(){
      this.pause = this.$store.state.audio.playing;
    },
    components: {
      audioPlayer
    },
  }
</script>

<style lang="scss" scoped>
  @import "../../style/font-icon/style.css";
  @import '../../style/mixin.scss';

  .my-footer {
    position:absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 94px;
    //
    /*height: 100%;*/
    /*top: 500px;*/
    //
    @include fj(start, center);
    background-color: rgb(253, 253, 253);
  }

  .my-footer .info {
    @include fj(space-between, center);
    @include wh(100%, 100%);
  }

  .my-footer .info img {
    padding-left: 12px;
    padding-right: 12px;
    width: 74px;
  }

  .title p:first-child {
    font-size: 24px;
    color: rgb(49, 49, 49);
    font-family: Tahoma;
    font-weight: 500;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .title {
    @include wh(100%, inherit)
  }

  .title p:nth-child(2) {
    font-size: 18px;
    font-weight: 400;
    color: rgb(150, 150, 150);
  }

  .icon {
    @include wh(200px, inherit);
    @include fj(space-between, center);
    padding-right: 10px;
  }

  .icon .icon-list-music {
    font-size: 50px;
    padding: 22px 16px 22px 8px;
    font-weight: 100!important;
  }

  .icon .play-status {
    font-size: 50px;
    padding: 22px 26px 22px 12px;
    font-weight: 100!important;
  }

  video {
    display: none;
  }

</style>
